package cn.opopopo.design_pattern_learn.行为型.visitor;

// 图片元素
class ImageElement implements DocumentElement {
    private String imageUrl;
    private int size;

    public ImageElement(String imageUrl, int size) {
        this.imageUrl = imageUrl;
        this.size = size;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public int getSize() {
        return size;
    }

    @Override
    public void accept(DocumentElementVisitor visitor) {
        visitor.visit(this);
    }
}